#include "stdafx.h"
#include "CZoomTimeCtrl.h"






CZoomTimeCtrl::CZoomTimeCtrl(DWORD dwStyle, wstring strCaption,const CRect &rc, UINT nID)
:	CTimeNumCtrl(dwStyle,strCaption, rc, nID)
{
	m_nIconNum = 11;
	m_bShowDecLeftZero = TRUE;
	m_nDecimalDigit = 2;
	InitDefault();
}

void CZoomTimeCtrl::Paint(CDC* pDC)
{
	if( m_rcControl.IsRectEmpty() || NULL==m_pImgLstBtn )
		return ;

	if(!IsVisible())
		return;

	CSize sz;
	if(m_pImgLstBtn)
		m_pImgLstBtn->GetIconSize(sz);

	PaintNumber( pDC,m_rcControl.TopLeft(), m_INT_Value,m_INT_digit,m_bINT_ShowLeftZero );


	if ( m_bInterval )
	{
		CPoint ptNum (m_rcControl.left+ m_INT_digit*sz.cx + m_INT_digit*m_nSpace,m_rcControl.top );

		m_pImgLstBtn->Draw( pDC,10,ptNum );	
		ptNum.x += sz.cx + m_nSpace;
		PaintNumber( pDC,ptNum, m_nDecimalValue,m_nDecimalDigit,m_bShowDecLeftZero );
	}
}
